DefineInputStreamMethod
DefineInputStreamMethod["name",{fname1->function1,fname2->function2,… }] defines a custom input stream method with the specified name, allowing the Wolfram Language to call the stream functions fnamei for opening and reading from an input stream.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.